/**   
* @Title: ActivitiEntity.java 
* @Package com.kerrykidz.workflow.dao.model 
* @Description: 
* Copyright: Copyright (c) 2014 
* Company:wuwh team by iss
* @author: as   
* @date: 2014年9月9日 下午5:28:31 
* @version: V1.0
*
*/
package com.kerrykidz.workflow.dao.model;

import java.util.Date;

import com.kerrykidz.system.util.DateUtil;
import com.kerrykidz.workflow.vo.OptHisVo;

/**
 * 
 * @ClassName: ActivitiEntity 
 * @description: Activiti流程引擎的Entity 
 * @author: zhuss 
 * @date: 2014年9月9日 下午5:28:38 
 * @version: V1.0
 *
 */
public class ActivitiEntity {
	/** 公用的属性  */
	private String id;
	private String taskId;
	private String procInstId;
	private String procDefId;
	private String executionId;
	private String key;
	private String name;
	private String message;
	private String userName;
	private String businessKey;
	private String startUserId;
	private String assignee;
	private String actId;
	private String groupId;
	private Date createTime;
	private Date updateTime;
	private Date startTime;
	private Date claimTime;
	private Date endTime;
	private String type;
	private String varType;
	private String userId;
	private Date time;
	private String text;
	private Double doubleValue;
	private Long longValue;
	private String taskDefKey;
	
	private String category;
	private String version;
	private String deploymentId;
	private String resourceName;
	private String dgrmResourceName;
	private String descrption;
	
	/** 附加的属性  */
	private String isCurrtOpt;
	private String isStartUser;
	private String holdDate;
	private String activityName;//节点名称
	private String procDefName;//流程定义名称
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getTaskId() {
		return taskId;
	}
	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}
	public String getProcInstId() {
		return procInstId;
	}
	public void setProcInstId(String procInstId) {
		this.procInstId = procInstId;
	}
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getActId() {
		return actId;
	}
	public void setActId(String actId) {
		this.actId = actId;
	}
	public Date getTime() {
		return time;
	}
	public void setTime(Date time) {
		this.time = time;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getTaskDefKey() {
		return taskDefKey;
	}
	public void setTaskDefKey(String taskDefKey) {
		this.taskDefKey = taskDefKey;
	}
	public String getIsCurrtOpt() {
		return isCurrtOpt;
	}
	public void setIsCurrtOpt(String isCurrtOpt) {
		this.isCurrtOpt = isCurrtOpt;
	}
	public String getGroupId() {
		return groupId;
	}
	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}
	public String getIsStartUser() {
		return isStartUser;
	}
	public void setIsStartUser(String isStartUser) {
		this.isStartUser = isStartUser;
	}
	public String getProcDefId() {
		return procDefId;
	}
	public void setProcDefId(String procDefId) {
		this.procDefId = procDefId;
	}
	
	public String getExecutionId() {
		return executionId;
	}
	public void setExecutionId(String executionId) {
		this.executionId = executionId;
	}
	
	public String getActivityName() {
		return activityName;
	}
	public void setActivityName(String activityName) {
		this.activityName = activityName;
	}
	
	public String getBusinessKey() {
		return businessKey;
	}
	public void setBusinessKey(String businessKey) {
		this.businessKey = businessKey;
	}
	
	public String getProcDefName() {
		return procDefName;
	}
	public void setProcDefName(String procDefName) {
		this.procDefName = procDefName;
	}
	public String getAssignee() {
		return assignee;
	}
	public void setAssignee(String assignee) {
		this.assignee = assignee;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public Double getDoubleValue() {
		return doubleValue;
	}
	public void setDoubleValue(Double doubleValue) {
		this.doubleValue = doubleValue;
	}
	public Long getLongValue() {
		return longValue;
	}
	public void setLongValue(Long longValue) {
		this.longValue = longValue;
	}
	public Date getStartTime() {
		return startTime;
	}
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	public Date getClaimTime() {
		return claimTime;
	}
	public void setClaimTime(Date claimTime) {
		this.claimTime = claimTime;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public String getStartUserId() {
		return startUserId;
	}
	public void setStartUserId(String startUserId) {
		this.startUserId = startUserId;
	}
	public String getVarType() {
		return varType;
	}
	public void setVarType(String varType) {
		this.varType = varType;
	}
	public String getHoldDate() {
		if(null != this.time){
			return DateUtil.formatDate("yyyy-MM-dd", this.time);
		}
		return holdDate;
	}
	public void setHoldDate(String holdDate) {
		this.holdDate = holdDate;
	}
	public String getCategory() {
		return category;
	}
	public void setCategory(String category) {
		this.category = category;
	}
	public String getVersion() {
		return version;
	}
	public void setVersion(String version) {
		this.version = version;
	}
	public String getDeploymentId() {
		return deploymentId;
	}
	public void setDeploymentId(String deploymentId) {
		this.deploymentId = deploymentId;
	}
	public String getResourceName() {
		return resourceName;
	}
	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}
	public String getDgrmResourceName() {
		return dgrmResourceName;
	}
	public void setDgrmResourceName(String dgrmResourceName) {
		this.dgrmResourceName = dgrmResourceName;
	}
	public String getDescrption() {
		return descrption;
	}
	public void setDescrption(String descrption) {
		this.descrption = descrption;
	}
	/**
	 * 历史记录
	 * @return
	 * @date: 2014年9月9日
	 */
	public OptHisVo changeOptHisVo(){
		OptHisVo v = new OptHisVo();
		v.setOptTime(DateUtil.formatDate("yyyy-MM-dd HH:mm:ss", this.time));
		v.setOptName(this.userName);
		v.setResult(this.message);
		v.setAdvice(this.text);
		return v;
	}
}
